let speed=6

class user_bullet {
  constructor(user_plane) {
    this.style = 1;
    this.speed = speed;
    this.atk = 2 * user_plane.bullet_style;
    this.dom = document.getElementById("bullet1");
    this.width = 40;
    this.height = 40;
    this.top = user_plane.top + 10;
    this.left = user_plane.left + user_plane.width / 2 - this.width / 2;
    this.max_width = 0;

    this.time = null;
    this.move = () => {
      this.top -= this.speed;
    };
  }
}
  class user_bullet2 {
  constructor(user_plane) {
    this.style = 1;
    this.speed = speed;
    this.atk = 2 * user_plane.atk_level;
    this.dom = document.getElementById("bullet2");
    this.width = 32;
    this.height = 60;
    this.top = user_plane.top + 10;
    this.left = user_plane.left + user_plane.width / 2 - this.width / 2;
    this.max_width = 0;

    this.time = null;
    this.move = () => {
      this.top -= this.speed;
    };
  }
}
  class user_bullet3 {
  constructor(user_plane) {
    this.style = 1;
    this.speed = speed;
    this.atk = 4 * user_plane.bullet_style;
    this.dom = document.getElementById("bullet3");
    this.width = 40;
    this.height = 60;
    this.top = user_plane.top + 10;
    this.left = user_plane.left + user_plane.width / 2 - this.width / 2;
    this.max_width = 0;

    this.time = null;
    this.move = () => {
      this.top -= this.speed;
    };
  }
}
  //激光
  class user_bullet_laser {
  constructor(user_plane) {
    this.style = 2;
    this.speed = 10;
    this.atk = user_plane.atk_level * 4;
    this.dom = document.getElementById("jiguang");
    this.top = user_plane.top - this.height;
    this.left = user_plane.left + user_plane.width / 2 - this.width / 2;
    this.max_width = 0;
    this.width = 25 * user_plane.atk_level;
    this.height = 100;
    this.time = null;
    this.move = () => {
      this.top -= this.speed;
    };
  }
}
export {user_bullet,user_bullet2,user_bullet3,user_bullet_laser,speed}
 